package com.lindroy.androidplayer.ui.home

import androidx.lifecycle.*
import com.lindroy.androidplayer.logic.Repository
import com.lindroy.androidplayer.logic.model.ArticleResp

/**
 * @author Lin
 * @date 2021/4/6
 * @function 置顶文章
 */
@Deprecated("之前的网络请求框架代码，已废弃")
class TopArticleViewModel : ViewModel() {

    private val articles = MutableLiveData<List<ArticleResp>>()

    val articleList = ArrayList<ArticleResp>()

    val articleLiveData = Transformations.switchMap(articles) {
        Repository.getTopArticles()
    }

    fun getTopArticles(){

    }


}